import com.designpattern.dao.StudentDao;
import com.designpattern.daoimpl.StudentDaoImpl;
import com.designpattern.vo.Student;


public class DaoPatternDemo {

	public static void main(String[] args) {
		StudentDao studentDao = new StudentDaoImpl();
		
		// print all students
		for(Student student: studentDao.getAllStudents()) {
			System.out.println("Student [Code] " + student.getStudentCode()
					+ "[Name] " + student.getStudentName());
		}
		
		Student studenta = new Student(3,"Nguyen A" );
		// insert a new student
		studentDao.insertStudent(studenta);
		
		
		

	}

}
